<template>
  <svg
    :style="{
      color: props.icoColor
    }"
    class="svg-icon"
    aria-hidden="true"
  >
    <use :xlink:href="iconName"></use>
  </svg>
</template>
<script lang="ts" setup>
import { withDefaults, defineProps, computed } from 'vue'
const props = withDefaults(
  defineProps<{
    iconClass: string
    icoColor: string
  }>(),
  {
    iconClass: '',
    icoColor: 'unset'
  }
)
const iconName = computed(() => `#MC_icon-${props.iconClass}`)
</script>

<style scoped>
.svg-icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
  font-size: 16px;
}
</style>
